<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>

</head>
</head>
<body>
<div id="app">
 <p>我最喜欢的书籍是:{{likeBook}}</p>
  <p>现在是:{{likeBook|ConBook}}</p>
  <hr/>
  <p>我的幸运数字:{{num}}</p>
  <p>我现在的幸运数字:{{num|ConNum}}</p>

</div>
<!-- 1:引包 -->
<script type="text/javascript" src="../../node_modules/vue/dist/vue.js"></script>
<script type="text/javascript">
  new Vue({
    el:"#app",
    data:{
      likeBook:"红楼梦",
      num:10
    },
    filters:{
      ConBook:function (e) {
        return e+','+'西游记'
      },
      ConNum:function (e) {
        return e+6
      }
    }
  })
</script>

</body>
</html>
